package com.briup.web.controller;

import com.briup.annotation.SystemLog;
import com.briup.result.Result;
import com.briup.service.AnalysisService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/analysis")
public class AnalysisController {
    //注入analysisService层对象
    @Autowired
    private AnalysisService analysisService;

    @GetMapping("/count")
    @ApiOperation("统计栏舍，栏圈，动物数量，冷库数量，员工数量信息接口")
    @SystemLog(business = "统计栏舍，栏圈，动物数量，冷库数量，员工数量信息")
    Result count() {
        return analysisService.count();
    }

    @GetMapping("/indexCount")
    @ApiOperation("统计动物体重信息接口")
    @SystemLog(business = "统计动物体重信息")
    Result indexCount() {
        return analysisService.indexCount();
    }
    @GetMapping("/countDisease")
    @ApiOperation("统计动物病症数量接口")
    @SystemLog(business = "统计动物病症数量")
    Result countDisease(){
        return analysisService.countDisease();
    }
    @GetMapping("/countSales")
    @ApiOperation("统计本年度12个月销售动物接口")
    @SystemLog(business = "统计本年度12个月销售动物")
    Result countSales(){
        return analysisService.countSales();
    }
}
